Intercepting Routes (1/1)
What are intercepting routes?
    Intercepting Routes: Allow you to intercept a route and show it in the context of another route. You can use these when keeping the context for the current page is important. E.g. Seeing all tasks while editing one task or expanding a photo in a feed.
    • These patterns allow you to build richer and more complex UIs, democratizing features that were historically complex for small teams and individual developers to implement.
    • Intercepting routes allows you to load a route from another part of your application within the current layout. This routing paradigm can be useful when you want to display the content of a route without the user switching to a different context.
    • For example, when clicking on a photo in a feed, you can display the photo in a modal, overlaying the feed. In this case, Next.js intercepts the /photo/123 route, masks the URL, and overlays it over /feed.
    • However, when navigating to the photo by clicking a shareable URL or by refreshing the page, the entire photo page should render instead of the modal. No route interception should occur.
    Intercepting routes can be defined with the (..) convention, which is similar to relative path convention ../ but for segments.
    • (.) to match segments on the same level
    • (..) to match segments one level above
    • (..)(..) to match segments two levels above
    • (...) to match segments from the root app directory